﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SimpleRest.Core.Routing;

namespace SimpleRest.Core
{
    /// <summary>
    /// Event arguments used when a service registered event gets fired.
    /// </summary>
    public class ServiceRegisteredEventArgs : EventArgs
    {
        public ServiceRegisteredEventArgs(string rootPath, string fullRootPath, Version version, ServiceRoute route, Type type)
        {
            this.RootPath = rootPath;
            this.Version = version;
            this.Route = route;
            this.FullRootPath = fullRootPath;
            this.Type = type;
        }

        /// <summary>
        /// The base root route path.
        /// </summary>
        public readonly string RootPath;

        /// <summary>
        /// The version of the service being registered.
        /// </summary>
        public readonly Version Version;

        /// <summary>
        /// The actual service route that is being registered.
        /// </summary>
        public readonly ServiceRoute Route;

        /// <summary>
        /// The full root route  (including version) that is being registered.
        /// </summary>
        public readonly string FullRootPath;

        /// <summary>
        /// The service type being registered.
        /// </summary>
        public readonly Type Type;
    }
}
